package com.agent.user.mapper;

import com.agent.user.entity.AdminUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 管理员用户Mapper
 * @author Jeff_Wan
 * @description 管理员用户数据访问层
 */
@Mapper
public interface AdminUserMapper extends BaseMapper<AdminUser> {
    @Select("SELECT * FROM admin_user WHERE username = #{username}")
    AdminUser findByUsername(@Param("username") String username);

    IPage<AdminUser> searchAdmins(Page<AdminUser> page, @Param("keyword") String keyword);
}